package com.bitoon.basketdudes.web.jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Embeddable;

@Embeddable
public class CorreoTotalPK implements Serializable {
    @Basic(optional = false)
    @Column(name = "email")
    private String email;
    @Basic(optional = false)
    @Column(name = "modulo_id")
    private int moduloId;

    public CorreoTotalPK() {
    }

    public CorreoTotalPK(String email, int moduloId) {
        this.email = email;
        this.moduloId = moduloId;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public int getModuloId() {
        return moduloId;
    }

    public void setModuloId(short moduloId) {
        this.moduloId = moduloId;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        //hash += (int) email;
        hash += (int) moduloId;
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof CorreoTotalPK)) {
            return false;
        }
        CorreoTotalPK other = (CorreoTotalPK) object;
        if (this.email != other.email) {
            return false;
        }
        if (this.moduloId != other.moduloId) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "com.bitoon.basketdudes.jpa.web.ArmarioEquipoPK[email=" + email + ", moduloId=" + moduloId + "]";
    }

}
